/*
 * 创建日期 2005-9-6
 *
 */
package com.vanda.exception;

import java.util.ArrayList;

/**
 * @author wangdapeng
 *
 */
public class VandaExtException extends VandaException{
	
	/**
	 * 保存异常信息KEY，对应STRTUS的资源文件
	 */
	private String key;
	
	
	
	public VandaExtException(){
	
	} 
			   
	public VandaExtException(String message){
	    super(message);
	} 
			   
	public VandaExtException(Throwable cause) {
		super(cause);
	}

	public VandaExtException(String message, Throwable cause) {
		super(message,cause);
	}
	
	
	public VandaExtException( String key, String message ){	
		super(message);
		this.key = key;
	}
	
	public VandaExtException( String key, String message, String[] params ){	
		super(message);
		this.key = key;
		super.params = params;
	}
	
	
	
	public VandaExtException( String key, String message, Throwable cause ){	
		super(message,cause);
		this.key = key;
	}
	
	public VandaExtException( String key, String message, String[] params, Throwable cause ){	
		super(message,cause);
		this.key = key;
		super.params = params;
	}
	
	/**
	 * 保存异常列表信息
	 */
	private ArrayList arrayList = new ArrayList(5);
	
	/**
	 * 添加异常信息到列表
	 * @param extExp
	 */
	public void addVandaExtException( VandaExtException extExp ){
		arrayList.add( extExp );
	}
	
	/**
	 * 返回异常信息列表 
	 * @return
	 */	
	public VandaExtException[] getVandaExtExceptions(){
		
		VandaExtException[] expArrays = (VandaExtException[])arrayList.toArray( new VandaExtException[ arrayList.size() ] );
		return( expArrays ); 
	}
	
	/**
	 * 清空异常信息列表
	 */
	public void clearExpArray(){
	     arrayList.clear();
	}
	
	


	/**
	 * @return
	 */
	public String getKey() {
		return key;
	}


}
